package com.lifang.test2;

import com.lifang.framework.context.support.AnnotationConfigApplicationContext;

import java.util.Map;

public class TestApp {

    /**
     * ioc + 循环依赖 + 基本生命周期，Aware感知，初始化 销毁方法
     */
    public static void main(String[] args) {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(TestApp.class);
        Map<String, UserService> beansOfType = applicationContext.getBeansOfType(UserService.class);
        beansOfType.forEach((key, value) -> value.sayHello("张三"));
    }

}
